package com.i2863.shiroDemo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.i2863.shiroDemo.dto.MenuInfo;
import com.i2863.shiroDemo.dto.PermissionInfo;
import com.i2863.shiroDemo.entity.Permission;
import com.i2863.shiroDemo.entity.Role;

import java.util.List;

public interface IPermissionService extends IService<Permission> {

    List<PermissionInfo> allPermissionInfo();

    List<MenuInfo> getMenuPermissions(String code);

    List<Permission> getTopDirectoryPermissions();

    // 获取当前角色拥有权限的菜单
    List<PermissionInfo> getCurrentUserPermissionMenu(Role role);
}